<?php

/**
 * main actions.
 *
 * @package    academia_de_escritores
 * @subpackage main
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class mainActions extends sfAeAction
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request)
  {
    $this->forward("main",'home');
  }
  
  public function executeHome(sfWebRequest $request){
  	$this->form = new ContactForm();
  }
  public function executeAboutUs(sfWebRequest $r){
  	if($r->getGetParameters()){
  	 	$this->redirect("about_us");
  	 }
  	 $i18N=sfContext::getInstance()->getI18N();
     $routing=sfContext::getInstance()->getRouting();
  	 $this->getUser()->setFlash("navigation", array_merge(WebGlobal::getNavHome($i18N, $routing),
		    											   WebGlobal::getNavAboutUs($i18N, $routing, true)
		    											   )
    											   , false);
    											   
    
      $this->QuienesSomos=SectionTable::getInstance()->findOneByCode("about-us");
  }
  
  public function executeFaqs(sfWebRequest $r){
  	 if($r->getGetParameters()){
  	 	$this->redirect("faqs");
  	 }
  	 $i18N=sfContext::getInstance()->getI18N();
     $routing=sfContext::getInstance()->getRouting();
  	 $this->getUser()->setFlash("navigation", array_merge(WebGlobal::getNavHome($i18N, $routing),
		    											   WebGlobal::getNavFaqs($i18N, $routing, true)
		    											   )
    											   , false);
     $this->Faqs=SectionTable::getInstance()->findOneByCode("faqs");
  }
}
